/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package pvt.delez.pam.virgin.impl;

import java.util.Collection;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectResolvingEList;

import pvt.delez.pam.virgin.ClassPathDescriptor;
import pvt.delez.pam.virgin.ClassPathEntry;
import pvt.delez.pam.virgin.VirginPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Class Path Descriptor</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link pvt.delez.pam.virgin.impl.ClassPathDescriptorImpl#getClassPaths <em>Class Paths</em>}</li>
 * </ul>
 *
 * @generated
 */
public class ClassPathDescriptorImpl extends EObjectImpl implements ClassPathDescriptor {
	/**
	 * The cached value of the '{@link #getClassPaths() <em>Class Paths</em>}' reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getClassPaths()
	 * @generated
	 * @ordered
	 */
	protected EList<ClassPathEntry> classPaths;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ClassPathDescriptorImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return VirginPackage.Literals.CLASS_PATH_DESCRIPTOR;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<ClassPathEntry> getClassPaths() {
		if (classPaths == null) {
			classPaths = new EObjectResolvingEList<ClassPathEntry>(ClassPathEntry.class, this, VirginPackage.CLASS_PATH_DESCRIPTOR__CLASS_PATHS);
		}
		return classPaths;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case VirginPackage.CLASS_PATH_DESCRIPTOR__CLASS_PATHS:
				return getClassPaths();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case VirginPackage.CLASS_PATH_DESCRIPTOR__CLASS_PATHS:
				getClassPaths().clear();
				getClassPaths().addAll((Collection<? extends ClassPathEntry>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case VirginPackage.CLASS_PATH_DESCRIPTOR__CLASS_PATHS:
				getClassPaths().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case VirginPackage.CLASS_PATH_DESCRIPTOR__CLASS_PATHS:
				return classPaths != null && !classPaths.isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //ClassPathDescriptorImpl
